package com.maxd.service.FreeOfCharge;
import com.maxd.model.FreeOfCharge;
import com.maxd.respository.FreeOfCharge.FreeOfChargeJpaRepository;
import com.maxd.respository.FreeOfCharge.FreeOfChargeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.Date;

@Service
public class FreeOfChargeServiceImpl implements IFreeOfChargeService {

    @Autowired
    private FreeOfChargeRepository freeOfChargeRepository;

    @Autowired
    private FreeOfChargeJpaRepository freeOfChargeJpaRepository;

    @Override
    public Integer selectByTime(Date time) {
        return freeOfChargeRepository.selectByTime(time);
    }

    @Override
    public Page<FreeOfCharge> selectFreeOfChargeList(Pageable pageable) {
        return freeOfChargeRepository.selectFreeOfChargeList(pageable);
    }

    @Override
    public FreeOfCharge save(FreeOfCharge freeOfCharge) {
        return freeOfChargeJpaRepository.save(freeOfCharge);
    }
}
